package com.hqd.jjvm.jnative.io;

import com.hqd.jjvm.jnative.JNativeRegistry;
import com.hqd.jjvm.rtda.JThread;

public class JWin32ErrorModeNativeRegistry extends JNativeRegistry {
    private static final JWin32ErrorModeNativeRegistry instance = new JWin32ErrorModeNativeRegistry();
    protected static final String CLASS_PATH = "sun/io/Win32ErrorMode";

    static {
        registry(CLASS_PATH, "setErrorMode", "(J)J", JWin32ErrorModeNativeRegistry::setErrorMode);
    }

    private static void setErrorMode(JThread jThread) {
        jThread.getJvmStack().pushOperandStackLongVal(0L);
    }

    public static JWin32ErrorModeNativeRegistry getInstance() {
        return instance;
    }
}
